Skip to content

Conversation

@AdityaPandeyCN
Copy link
Contributor

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

This PR adds documentation for the Scipywrapper implemented in PR #927

Signed-off-by: AdityaPandeyCN <[email protected]>
Signed-off-by: AdityaPandeyCN <[email protected]>
@ChrisRackauckas ChrisRackauckas merged commit e5e207d into SciML:master Jun 21, 2025
4 of 7 checks passed
@ChrisRackauckas
Copy link
Member

│ ```@example SciPy2
│ using Optimization, OptimizationSciPy
│ 
│ # Objective
│ obj(x, p) = (x[1] + x[2] - 1)^2
│ 
│ # Single non-linear equality: x₁² + x₂² = 1
│ cons(res, x, p) = (res .= [x[1]^2 + x[2]^2 - 1.0])
│ 
│ x0   = [0.5, 0.5]
│ prob = OptimizationProblem(
│     OptimizationFunction(obj; cons = cons),
│     x0, nothing, lcons = [0.0], ucons = [0.0])
│ 
│ sol = solve(prob, ScipyCOBYLA())
│ @show sol.u, sol.objective
│ ```
│   exception =
│    SciPy optimization failed: Python: ValueError: Constraints of type 'eq' not handled by COBYLA.

Sorry I missed that failure. That should get addressed.

@AdityaPandeyCN
Copy link
Contributor Author

Apologies, will correct this asap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants